DevJourney

Python/RegEx/Basics/String Splitting/rsplit()/1.py

text = 'python is easy'
print(text.rsplit())
text = 'python*is*easy'
print(text.rsplit('*'))

# Output:
#####################
# ['python', 'is', 'easy']
# ['python', 'is', 'easy']
View on GitHub